package com.ivo.biz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ivo.core.hibernate.HibernateInvoker;

/**
 * 
 *
 * @author Minkey Wang
 * @version 2018年1月22日
 */
@Service
public class MajorRuleService {
    @Autowired
    private HibernateInvoker hibernateInvoker;
    
	public MajorRule getMajorRule(String factory,String level) {
		String hql ="select r from MajorRule r where r.isValid is true and r.factory = ?0 and r.level = ?1" ;
		return (MajorRule) hibernateInvoker.findUnique(hql, factory,level);
	}
}
